package com.xjrsoft.module.customerTwo.vue输出区域.dfa.service.impl;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.xjrsoft.core.tool.utils.StringUtil;
import com.xjrsoft.module.customerTwo.vue输出区域.dfa.entity.Table09218;
import com.xjrsoft.module.customerTwo.vue输出区域.dfa.dto.Table09218ListDto;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xjrsoft.common.page.ConventPage;
import com.xjrsoft.common.page.PageOutput;
import java.util.List;
import com.xjrsoft.module.customerTwo.vue输出区域.dfa.mapper.Table09218Mapper;
import com.xjrsoft.module.customerTwo.vue输出区域.dfa.service.ITable09218Service;
import com.xjrsoft.core.mp.base.BaseService;
import com.xjrsoft.core.tool.utils.Func;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;

/**
 *  服务实现类
 *
 * @author dadasfdas
 * @since 2023-12-07
 */
@Service
@AllArgsConstructor
public class Table09218ServiceImpl extends BaseService<Table09218Mapper, Table09218> implements ITable09218Service {


	@Override
	public IPage<Table09218> getPageList(Table09218ListDto pageListDto) {
		Wrapper<Table09218> wrapper = Wrappers.<Table09218>query().lambda()
				.like(!StringUtil.isEmpty(pageListDto.getField1001abe()), Table09218::getField1001abe, pageListDto.getField1001abe());
		return this.page(ConventPage.getPage(pageListDto), wrapper);
	}

	@Override
	public boolean addTable09218(Table09218 table09218) {
		boolean isSuccess = this.save(table09218);
		return isSuccess;
	}

	@Override
	public boolean updateTable09218(String id, Table09218 table09218) {
		table09218.setId(id);
		return this.updateById(table09218);
	}

	public boolean delete(String ids) {
		List<String> idList = Func.toStrList(ids);
		if (this.removeByIds(idList)) {
			return true;
		}
		return false;
	}

}